package com.superjson.showpro.base;

/**
 * Created By zby on 11:32 2019/6/20
 */
public enum HeaderEnum {

    //    解决跨域的问题
    HEADER_ACCESS_CONTROL_ALLOW_ORIGIN("Access-Control-Allow-Origin", "Origin"),
    HEADER_ACCESS_CONTROL_ALLOW_METHODS("Access-Control-Allow-Methods", "GET, HEAD, POST, PUT, DELETE, OPTIONS, PATCH"),
    HEADER_ACCESS_CONTROL_MAX_AGE("Access-Control-Max-Age", "3600"),
    HEADER_ACCESS_CONTROL_ALLOW_HEADERS("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept"),
    //        解决session的问题
    HEADER_ACCESS_CONTROL_ALLOW_CREDENTIALS("Access-Control-Allow-Credentials", "true"),
    ACCESS_CONTROL_EXPOSE_HEADERS("Access-Control-Expose-Headers", "name,session,userId"),
    CONTENT_LANGUAGE("Content-Language", "zh-CN,zh");

    HeaderEnum(String key, String value) {
        this.key = key;
        this.value = value;
    }

    /**
     * 响应key值
     */
    private String key;

    /**
     * 响应value值
     */
    private String value;

    public String key() {
        return key;
    }

    public String value() {
        return value;
    }

}
